//
//  MyVoiceViewController.m
//  NewChat
//
//  Created by 马欢 on 16/2/28.
//  Copyright © 2016年 蓝鸥. All rights reserved.
//

#import "MyVoiceViewController.h"

@interface MyVoiceViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *myVoiceImage;
@property (weak, nonatomic) IBOutlet UIButton *myVoiceBtn;
@property (weak, nonatomic) IBOutlet UIButton *repeatBtn;

@end

@implementation MyVoiceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.title = @"录制声音签名";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"取消" style:(UIBarButtonItemStylePlain) target:self action:@selector(backAction:)];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"保存" style:(UIBarButtonItemStylePlain) target:self action:@selector(backAction:)];
    
    self.myVoiceImage.layer.cornerRadius = self.myVoiceImage.frame.size.width/2.0;
    self.myVoiceBtn.layer.cornerRadius = self.myVoiceBtn.frame.size.width/2.0;
    
    [self.myVoiceBtn addTarget:self action:@selector(myVoice) forControlEvents:(UIControlEventTouchUpInside)];
    [self.repeatBtn addTarget:self action:@selector(repeat) forControlEvents:(UIControlEventTouchUpInside)];
}

-(void)myVoice{
    NSLog(@"播放我的录音签名");
}

-(void)repeat{
    NSLog(@"重新录语音签名");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)viewWillAppear:(BOOL)animated{
    self.view.backgroundColor = [UIColor colorWithRed:245/255.0 green:245/255.0 blue:245/255.0 alpha:1];
}

-(void)backAction:(UIBarButtonItem *)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
